/**
 * 
 */
package com.thon.security;

import java.text.MessageFormat;

import org.apache.shiro.config.Ini;
import org.apache.shiro.config.Ini.Section;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author manpiaoyi
 * @mail manpiaoyi@126.com
 * @date 2014-10-15
 * @description TODO
 */
public class ChainDefinitionSource implements FactoryBean<Object> {	
	
	private String filterChainDefinitions;  
	/** 
     * 默认premission字符串 
     */  
    public static final String PREMISSION_STRING="perms[\"{0}\"]";  
	@Override
	public Object getObject() throws Exception {
		ChainDefinitionSource chainDefinitionSource = new ChainDefinitionSource();	
	    filterChainDefinitions+="\n/api/configure/get = authc";
	    chainDefinitionSource.filterChainDefinitions = filterChainDefinitions;
		return chainDefinitionSource;
	}
	public String getFilterChainDefinitions() {
		return filterChainDefinitions;
	}
	public void setFilterChainDefinitions(String filterChainDefinitions) {
		this.filterChainDefinitions = filterChainDefinitions;
	}
	@Override
	public Class<?> getObjectType() {		
		  return this.getClass();  
	}
	@Override
	public boolean isSingleton() {		
		return false;
	}
}
